package com.yangwei.examination.teacher.mappers;

import com.yangwei.examination.teacher.pojo.BankQuestionAnswer;
import com.yangwei.examination.teacher.pojo.BankQuestionChoice;
import com.yangwei.examination.teacher.pojo.PaperQuestionAnswer;
import com.yangwei.examination.teacher.pojo.PaperQuestionChoice;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface PaperQuestionAnswerDtoMapper {

    PaperQuestionAnswerDtoMapper INSTANCE = Mappers.getMapper(PaperQuestionAnswerDtoMapper.class);

    @Mappings({
            @Mapping(target = "id",  ignore = true),
            @Mapping(target = "questionId", ignore = true),
    })
    PaperQuestionAnswer toPaperQuestionAnswerDto(BankQuestionAnswer bankQuestionAnswer);

    List<PaperQuestionAnswer> toPaperQuestionAnswerListDto(List<BankQuestionAnswer> bankQuestionAnswerList);

}
